﻿Imports BusinessRule.DTO

'Description:转工管理类接口
'Copyright (c) : 通力凯顿（北京）系统集成有限公司
'Writer:Wangjh
'create Date:2017-5-15
'Rewriter:
'Rewrite Date:
Public Interface uLMSContainerShipIBusiness
    ''' <summary>
    ''' 获取查询结果
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerShipData(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 查询单件单卡子卡的所需信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetChildContainerNo(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 获取当前工序及之后工序的转工信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetSpecShipInfo(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 插入数据到转工信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <param name="containerShipRecordID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertContainerShip(ByVal para As Dictionary(Of String, String), ByRef containerShipRecordID As String) As Boolean
    ''' <summary>
    ''' 插入数据到转工工序明细
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <param name="workflowStepID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertContainerShipStep(ByVal containerShipRecordID As String, ByVal workflowStepID As String) As Boolean
    ''' <summary>
    ''' 获取已转工申请的工序
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetAppliedSpecShip(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 删除已转工申请的工序
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <param name="workflowStepID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelAppliedSpecShip(ByVal containerShipRecordID As String, ByVal workflowStepID As String) As Boolean
    ''' <summary>
    ''' 按唯一ID删除转工
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelAppiedShip(ByVal containerShipRecordID As String) As Boolean
    ''' <summary>
    ''' 添加审核数据
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateAppiedShip(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 更新转出数据
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateAppiedShipSender(ByVal para As Dictionary(Of String, Object)) As Boolean
    ''' <summary>
    ''' 更新接收数据到转工记录表
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateShipRecordAccept(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 获取加工完成后的转工批次
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerShipFinished(ByVal QueryCondition As Dictionary(Of String, String)) As uMESProcessResult
    ''' <summary>
    ''' 插入转工完成信息
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertContainerShipRecive(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 加载选中流水卡的转工信息
    ''' </summary>
    ''' <param name="ID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function LoadContainerShipInfo(ByVal ID As String, ByVal status As String) As DataTable
    Function LoadContainerShipInfo(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 主制厂转入时更新的数据
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateContainerShipRecive(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 当工序承制分厂不是本分厂时插入到转工表
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertShipNotApplied(ByVal para As Dictionary(Of String, String), ByRef ContainerShipID As String) As Boolean
    ''' <summary>
    ''' 根据当前containerid和工序ID获取originalFactorydID和工序所属车间ID
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFactoryID(ByVal ContainerID As String, ByVal WorkFlowStepID As String) As DataTable
    ''' <summary>
    ''' 根据工艺流程ID和工序号获取工序ID
    ''' </summary>
    ''' <param name="sequence"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetNextWorkFlowID(ByVal workFlowID As String, ByVal sequence As String) As String

    ''' <summary>
    ''' 获取工序信息
    ''' </summary>
    ''' <param name="workFlowID"></param>
    ''' <param name="sequence"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkFlowStep(ByVal workFlowID As String, ByVal sequence As String) As DataTable

    ''' <summary>
    ''' 固定转工
    ''' </summary>
    ''' <param name="para"></param>
    ''' <param name="m_CommonObj"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function FixedContainerShip(ByVal para As Dictionary(Of String, String), ByVal m_CommonObj As uLMSCommonIBusiness) As Boolean

    ''' <summary>
    ''' 获取所有已临时转工的工序信息 create tianFW
    ''' </summary>
    ''' <param name="conotainerid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetShipWorkflowStepIDs(ByVal conotainerid As String) As DataTable
    ''' <summary>
    ''' 指定批次的指定工序是否已存在转工申请
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function IsExitsContainerShip(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 插入直接转回本分厂的数据
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertShipBackOfNoComplete(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 更新结转标记
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateShipTransfer(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 通过批次ID获取批次未接收的转工记录
    ''' create tianFW 2017年12月27日
    ''' </summary>
    ''' <param name="containerID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks> 
    Function GetHistoryShipInfo(ByVal containerID As String, ByVal type As Integer) As DataTable

    ''' <summary>
    ''' 获取批次当前序是否存在已接收的转工记录 create by tianFW 2018年10月11日
    ''' </summary>
    ''' <param name="containerIDs">批次ID</param>
    ''' <param name="workflowstepID">批次当前序ID</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerCurrShipInfo(ByVal containerIDs As String, ByVal workflowstepID As String) As DataTable

    ''' <summary>
    ''' 根据转工唯一ID获取转工信息 create tianFW 2018年3月16日
    ''' </summary>
    ''' <param name="ID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetShipInfoByID(ByVal ID As String) As DataTable

    ''' <summary>
    ''' 根据转工唯一ID获取转工及工序信息 create tianFW 2018年3月16日
    ''' </summary>
    ''' <param name="ID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetShipStepInfoByID(ByVal ID As String) As DataTable
    ''' <summary>
    ''' 获取处于待转出到未转回的所有转工记录
    ''' add:Wangjh 20180418
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetNoCompleteShipInfo(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 获取批次对应子工艺的父工序信息
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFaWorkFlowStepOfNoShip(ByVal containerID As String, ByVal subWorkFlowID As String) As DataTable
    ''' <summary>
    ''' 插入转工退回信息
    ''' add:Wangjh 
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InserTaskReturnInfo(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 转工退回后确认
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function ConfirmShipReturn(ByVal para As Dictionary(Of String, String)) As Boolean


    ''' <summary>
    ''' 获取含有自动转工或外委的批次
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetAutoShipOrCommissioning(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取工序转工或外委信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepShipOrCommission(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 插入临时取消转工或外委的批次工序信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertCancleAutoShipOrComission(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 删除批次工序取消外委转工
    ''' </summary>
    ''' <param name="ID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelContainerStepNoShip(ByVal ID As String) As Boolean

    ''' <summary>
    ''' 获取批次工序取消的自动转工和外委记录
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetCancleAutoShipOrComission(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 判断批次对应的转工记录是否有派报工记录0没有 1有派工 2有报工
    ''' add:Wangjh 20181113
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function IsDispatchOrReportOfConShip(ByVal para As Dictionary(Of String, String)) As Integer
    ''' <summary>
    ''' 查询子工艺的批次
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetSonContainer(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 保存批次转工完成信息v3.0（只限热表）
    ''' </summary>
    ''' <param name="para"></param>
    ''' <param name="msg"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveRbContainerShipRecive(ByVal para As Dictionary(Of String, String), ByRef msg As String) As Boolean
    ''' <summary>
    ''' 将转工转出信息汇总后保存到WMS推送表 add by zhangrj 20250918
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <param name="m_UserInfo"></param>
    ''' <param name="message"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SendContainerShipDataToWMS(ByVal containerShipRecordID As String, ByVal m_UserInfo As CurrentUserInfo, ByRef message As String) As Boolean
    ''' <summary>
    ''' 将转工撤销信息汇总后保存到WMS推送表 add by zhangrj 20250918
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <param name="m_UserInfo"></param>
    ''' <param name="message"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SendContainerShipCancelDataToWMS(ByVal containerShipRecordID As String, ByVal m_UserInfo As CurrentUserInfo, ByRef message As String) As Boolean
    ''' <summary>
    ''' 将转工完成信息汇总后保存到WMS推送表 add by zhangrj 20251014
    ''' </summary>
    ''' <param name="containerShipRecordID"></param>
    ''' <param name="m_UserInfo"></param>
    ''' <param name="message"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SendContainerShipFinishDataToWMS(ByVal containerShipRecordID As String, ByVal m_UserInfo As CurrentUserInfo, ByRef message As String) As Boolean
End Interface
